<template>
  <div>
      <img class="video" src="http://192.168.0.110:5000/face_collection" style="margin-top: 10px;margin-left:20px;width: 830px;height: 600px">
      <el-button type="success" @click="train()" style="margin-left: 20px">采集结束</el-button>
      <img v-if="trainFlag" src="http://192.168.0.110:5000/face_collection_training">
      <el-button type="success" v-if="trainFlag" @click="closeCollection()" style="margin-left: 50px">训练</el-button>
  </div>
</template>

<script>
export default {
  name: "FaceCollection",
  data(){
    return{
      faceId:0,
      faceType:"",
      trainFlag:false,
    }
  },
  created() {
    this.getMessage();
  },
  methods:{
    getMessage: function(){
      this.faceId = localStorage.getItem("faceId");
      this.faceType = localStorage.getItem("faceType");
    },
    train: function(){
      this.trainFlag = true;
    },
    closeCollection(){
      this.$router.go(0);
    },
  }
}
</script>

<style scoped>

</style>
